package excutors;

import java.util.concurrent.Executor;
import java.util.concurrent.FutureTask;

public class ExcutorDemo implements Executor {

    @Override
    public void execute(Runnable command) {
        command.run(); // 执行任务
    }

    public static void main(String[] args) {
        FutureTask futureTask=new FutureTask(()->{
            System.out.println("Task is running");
            return 1;
        });
        new Thread(futureTask).start();

    }
}
